package edu.ccut.saturn.workflow.activity.execute;

import java.util.HashMap;
import java.util.Map;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;

public class AJAXCallBackMessage extends DefaultComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8535946403624430813L;

	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		String success = (String)parameterContext.getParameterValue(0);
		String code = (String)parameterContext.getParameterValue(1);
		if(code==null){
			code="";
		}
		String text = (String)parameterContext.getParameterValue(2);
		Map<String,String> saveMap = new HashMap<String, String>();
		saveMap.put("success", success);
		saveMap.put("code", code);
		saveMap.put("text", text);
		parameterContext.setParameter(3, saveMap);
	}
}